import request from '@/router/axios';

const prefix = '/bdPortal/';
const headers = {
  'Token': 'AD8Z8US72MCRp0pAWmr4VHzDtjfud6XZCPIJ8caa1qpSEJWc0NhB1Q==',
  'UserId': '1',
  'Authorization': 'Basic c3VwZXJhZG1pbjpTbWFydCMyMDIw'
}

export const getList = (index, size , params) => {
  return request({
    url: prefix + 'api/repository/models',
    method: 'post',
    data: {
      ...params,
      page: {
        size,
        index
      }
    },
    headers
  })
}

export const createModel = (body) => {
  return request({
    url: prefix + 'api/repository/models/newMyModel',
    method: 'post',
    data: body,
    headers
  })
}

export const deployment = (id) => {
  return request({
    url: `${prefix}api/repository/models/${id}/deployment`,
    method: 'post',
    data: {},
    headers
  })
}

export const processService = {

}
